package com.foo;

import org.springframework.beans.factory.FactoryBean;

public class CarBean implements FactoryBean<CarBean.Car> {
    class Car{
        public String catinfo;
        public  Component component;

    }



    private String cInfo;
    private Component component;

    public Component getComponent() {
        return component;
    }

    public void setComponent(Component component) {
        this.component = component;
    }

    public String getcInfo() {
        return cInfo;
    }

    public void setcInfo(String cInfo) {
        this.cInfo = cInfo;
    }

    @Override
    public Car getObject() throws Exception {

        Car car = new Car();
        car.catinfo = cInfo;
        car.component = component;

        return car;
    }

    @Override
    public Class<?> getObjectType() {
        return Car.class;
    }

    @Override
    public boolean isSingleton() {
        return true;
    }
}